﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for ManagerUser
/// </summary>
public class ManagerUser
{
    public static string UserName = "";
    public static Dictionary<string,BankAccount> lstOfAccount = new Dictionary<string,BankAccount>();
    
    public static void setUserName(string usern)
    {
        UserName = usern;
    }
    public static int getAccounts(){
        List<BankAccount> lst = SqlProxy.getAllAccount(UserName);

        if (lst.Count == 0)
        {
            return 0;
        }
        else
        {
            foreach (BankAccount ac in lst)
            {
                lstOfAccount.Add(ac.Account_name, ac);

            }
            return lst.Count;
        }

    }
}